<?PHP
session_start();
include("config/connect.php");
include("public/common.php");

function GetLove($tag)
{
	$result = mysql_query( "select sum(favorite) as tmp from goods_items where tag like '%$tag%'" );
	if ($result)
	{
		$rowTemp = mysql_fetch_assoc($result);
		return $rowTemp["tmp"] + 10;
	}
	
	return "186";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="兔丝街,秋季女装,搭配,分享,网购,淘宝网购,网购大全,网购女装,淘宝网购物,淘宝网导购,淘宝网女装,购物分享,新奇,新潮,好玩" /> 
<meta name="description" content="兔丝街是一个充满卡通神秘色彩，新潮有趣，奇特好玩的时尚购物社区，是您的秘密后花园。街上的商品琳琅满目，最好看、最超值的衣服、鞋子、包包、配饰、化妆品，让您爱不惜手；奇特有趣的小商品，实用又好玩，让您惊喜又惊讶。" /> 
<meta name="robots" content="index, follow" /> 
<meta name="googlebot" content="index, follow" />
<title>兔丝街 - 崇尚唯美、精致、潮流的搭配风格，美丽约定时尚购物~</title>
<link type="text/css" rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/shopping_street=20110831.css" />    
<script language="javascript" src="js/common.js"></script>
</head>
<body class="HomePage">
<div id="wrapper">
	<!---head kaishi--->
     <?php
	$ht_path = "./";
	include("headtop.php"); 
	?>
    <!-----head 结束----->
    
<?PHP	// 缓存开始
date_default_timezone_set("Asia/Chongqing");
require_once('public/cache.inc.php');
$cachedir = "cache/";
if (isset($il_cachedir))	$cachedir = $il_cachedir;
$cachedir .= date('Y-m-j')."/";
$cache = new Cache($cachedir,12*3600);	// 12小时
if (isset($_GET["refresh"]))
{
	$url = str_replace("&refresh","",$cache->geturl());
	$url = str_replace("?refresh","",$cache->geturl());
	$cache->clean2($cache->getcacheid2($url));
}

$hitCache = $cache->load();
if (!isset($hitCache) || !$hitCache) {
?>
    <!---顶部轮播开始--->
    <div class="main_content">
        <div id="slide">
            <ul><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li></ul>
            <div id="slide_list">
                
                <a href="http://www.tusijie.com/activity/fx.php" target="_blank"><img src="http://www.tusijie.com/images/flash/01.jpg" title="第一名：Dior迪奥真我香水" /></a>
                <a href="http://www.tusijie.com/activity/fx.php" target="_blank"><img src="http://www.tusijie.com/images/flash/02.jpg" title="第二名：benefit贝玲妃完美肌肤控油打底霜" /></a>
                <a href="http://www.tusijie.com/activity/fx.php" target="_blank"><img src="http://www.tusijie.com/images/flash/03.jpg" title="第三名：2011年秋季新款荷叶边修身短款小西装" /></a>
                <a href="http://www.tusijie.com/activity/fx.php" target="_blank"><img src="http://www.tusijie.com/images/flash/04.jpg" title="第四名：VIVI同款英伦复古压花提花棕色单肩包" /></a>
                <a href="http://www.tusijie.com/activity/fx.php" target="_blank"><img src="http://www.tusijie.com/images/flash/05.jpg" title="第五名：欧美复古彩釉桃心长款毛衣链" /></a>
            </div>
        </div>
        <div class="tusi_news">
        	<div class="tusi_doing">
            	<h1 class="s1"><span>做分享达人</span> 赢 Dior香水！</h1>
                <p class="s2">中奖达人：</p>
                <ul>
                	<li>第一名：Mrs.chen</li>
                    <li>第二名：神马</li>
                    <li>第三名：小锦</li>
                    <li>第四名：漠漠安</li>
                    <li>第五名：小巫碎碎念</li>
                </ul>
                <p class="s2"><a href="http://www.tusijie.com/activity/fx.php" target="_blank">详情点击</a></p>
            </div>
        </div> 
    </div>
    <!---焦点图--->
	<script type="text/javascript" language="javascript">
    var t = n = count = 0;
    $(function(){
        count = $("#slide_list a").size();
        $("#slide_list a:not(:first-child)").hide();
        $("#slide ul li:first-child").css({"background":"#FD699B",'color':'#fff'});
        $("#slide ul li").click(function() {
            var i = $(this).text() - 1;
            n = i;
            if (i >= count) return;
            $("#slide_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
            $(this).css({"background":"#FD699B",'color':'#fff'}).siblings().css({"background":"none",'color':'#fff'});
        });
        t = setInterval("showAuto()", 4000);
        $("#slide").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 4000);});
    })
    function showAuto(){
        n = n >= (count - 1) ? 0 : n + 1;
        $("#slide ul li").eq(n).trigger('click');
    }
    </script>
    <!--顶部轮播结束-->
    
    <!---广告开始---->
    <div class="activityBar">
    	<ul>
        	<li><a href="http://www.tusijie.com/zt"><img src="activity/img/bar_20110825.gif" alt="" title="兔丝街开学季活动 大奖等你拿" /></a></li>
            <li><a href="http://www.tusijie.com/activity/fx.php"><img src="activity/img/bar_20110825bb.gif" alt="" title="分享达人有奖招募" /></a></li>
        </ul>
    </div>
    <!---广告结束---->
    
    <div id="main">
    	<!--- 关于衣服--->
    	<div class="piece1 mb20">
            <div style="padding:0" class="piece1_bd">
                <h1 class="share_title">
                    关于<em>衣服</em>的分享
                    <span class="st_key">
                    	<a href="http://www.tusijie.com/tag/?cl=%E8%A1%A3%E6%9C%8D&tag=&order=w" target="_blank">热门</a><a href="http://www.tusijie.com/tag/?cl=%E8%A1%A3%E6%9C%8D&tag=&order=n" target="_blank">最新</a><span>|</span>
                        <?PHP
                        $result = mysql_query( "select * from tsj_home_catelog where type=2 and parent_name='衣服' order by `order`" );
						while( $result && $row = mysql_fetch_assoc( $result ))
						{
							echo '<a href="tag/?tag='.urlencode($row["name"]).'" target="_blank">'.$row["name"].'</a>';
						}
						?>
                 	</span>
                 	<a target="_blank" class="share_more" href="http://www.tusijie.com/tag/?cl=%E8%A1%A3%E6%9C%8D">more</a>
                </h1>
                <div class="share_piece">
                	<div style="height:384px;overflow:hidden" class="share_tetris">
                <?PHP
					$rowCount = 0;
					$topSpan = 0; $leftSpan = 0;
					$result = mysql_query( "select * from tsj_home_catelog where type=1 and parent_name='衣服' order by `order`" );
					while( $result && $row = mysql_fetch_assoc( $result ))
					{
						$bBigPic = $rowCount==3 || $rowCount==11;
				?>
                	<div style="top:<?PHP echo $topSpan ?>px;left:<?PHP echo $leftSpan ?>px;" class="<?PHP if($bBigPic) echo "t2"; else echo "t1"; ?>">
                        <img src="<?PHP if ($bBigPic) echo $row["pic_url"]."_310x310.jpg"; else echo $row["pic_url"]."_160x160.jpg"; ?>">
                        <div class="sk" style="display:none; ">
                            <div class="fc"><span><?PHP echo GetLove($row["name"]) ?></span><i></i></div>
                            <a href="tag/?tag=<?PHP echo urlencode($row["name"]);?>" fId="1bozf6" target="_blank" class="kw"><?PHP echo $row["name"]; ?></a>
                            <a href="" fId="1bozf6" target="_blank" class="au"></a>
                        </div>
                    </div>
                 <?PHP
				 	$topSpan += 128 + 1;
					if (++$rowCount % 3 == 0)
					{
						$topSpan = 0;
						$leftSpan += 128 + 1;
					}
					
					if ($rowCount == 4 || $rowCount == 5)
					{
						$topSpan = 2 * 128 + 2;
						if ($rowCount == 5)
							$leftSpan += 128 + 1;
					}
					if ($rowCount == 10)
					{
						$topSpan = 0;
						$leftSpan += 128 + 1;
					}
					if ($rowCount == 11)
					{
						$leftSpan -= 128 + 1;
					}
					if ($rowCount == 12)
					{
						$leftSpan += 128 + 1;
					}
				  } 
				  ?>
            	</div>                  
            </div>
            <div class="piece1_hd"></div>
        </div>
        <!---关于裤子---->
        <?PHP
		$result0 = mysql_query( "select * from tsj_home_catelog where type=0 and name!='衣服' order by `order`" );
		while( $result0 && $row0 = mysql_fetch_assoc( $result0 ))
		{
			$i = 0;
		?>
        <div class="piece1 mb20">
            <div style="padding:0" class="piece1_bd">
                <h1 class="share_title">
                    关于<em><?PHP echo $row0["name"]; ?></em>的分享
                    <span class="st_key">
                    	<a href="http://www.tusijie.com/tag/?cl=<?PHP echo $row0["name"]; ?>&tag=&order=w" target="_blank">热门</a><a href="http://www.tusijie.com/tag/?cl=<?PHP echo $row0["name"]; ?>&tag=&order=n" target="_blank">最新</a><span>|</span>
                         <?PHP
                        $result = mysql_query( "select * from tsj_home_catelog where type=2 and parent_name='".$row0["name"]."' order by `order`" );
						while( $result && $row = mysql_fetch_assoc( $result ))
						{
							echo '<a href="tag/?tag='.urlencode($row["name"]).'" target="_blank">'.$row["name"].'</a>';
						}
						?>
                 	</span>
                 	<a target="_blank" class="share_more" href="http://www.tusijie.com/tag/?cl=<?PHP echo $row0["name"]; ?>">more</a>
                </h1>
                <div class="share_piece">
                	<div style="height:256px;overflow:hidden;" class="share_tetris">
                <?PHP
					$rowCount = 0;
					$topSpan = 0; $leftSpan = 0;
					$result = mysql_query( "select * from tsj_home_catelog where type=1 and parent_name='".$row0["name"]."' order by `order`" );
					while( $result && $row = mysql_fetch_assoc( $result ))
					{
						$bBigPic = $rowCount==2;
				?>
                	<div style="top:<?PHP echo $topSpan ?>px;left:<?PHP echo $leftSpan ?>px;" class="<?PHP if($bBigPic) echo "t2"; else echo "t1"; ?>">
                        <img src="<?PHP if ($bBigPic) echo $row["pic_url"]."_310x310.jpg"; else echo $row["pic_url"]."_160x160.jpg"; ?>">
                        <div class="sk" style="display:none; ">
                            <div class="fc"><span><?PHP echo GetLove($row["name"]) ?></span><i></i></div>
                            <a href="tag/?tag=<?PHP echo urlencode($row["name"]);?>" fId="1bozf6" target="_blank" class="kw"><?PHP echo $row["name"];?></a>
                            <a href="" fId="1bozf6" target="_blank" class="au"></a>
                        </div>
                    </div>
                 <?PHP
				 	$topSpan += 128 + 1;
					if (++$rowCount % 2 == 0)
					{
						$topSpan = 0;
						$leftSpan += 128 + 1;
					}
					
					if ($rowCount == 3)
					{
						$topSpan = 0;
						$leftSpan += 2*(128 + 1);
						$rowCount++;
					}
				  } 
				  ?>
                  	</div>
                </div>
                <div class="piece1_hd"></div>
            </div>
        </div>
       <?PHP } ?>
        
    </div>
</div>
<!---网尾 kaishi--->
<?php
     include("networkend.php"); 
?>
<?php
     include("scrolltop.php"); 
?>
<!------------>
<script language="javascript" src="js/home.js"></script>
</body>
</html>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F22b7662ec7d02c816ddfd8f6df6e5cea' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20984072-3']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

<?PHP
$cache->write();
}
?>